<section style="background-image:url('<%= current_participatory_space.attached_uploader(:banner_image).url %>');" data-conference-hero>
  <div class="conference__hero">
    <div class="conference__hero-text">
      <h1 class="h1 text-5xl">
        <%= translated_attribute(current_participatory_space.title) %>
      </h1>
      <p class="conference__hero-slogan">
        <%= translated_attribute(current_participatory_space.slogan) %>
      </p>
      <p class="conference__hero-location">
        <%= participatory_space_helpers.render_date(current_participatory_space) %>
        <%= " @ " + current_participatory_space.location.to_s if current_participatory_space.location %>
      </p>
      <% if current_participatory_space.registrations_enabled? %>
        <% if current_participatory_space.has_registration_for?(current_user) %>
          <%= link_to t("layouts.decidim.conference_hero.manage_registration"), decidim_conferences.conference_registration_types_path(current_participatory_space, locale: current_locale), class: "button button__lg button__primary" %>
        <% elsif current_participatory_space.has_published_registration_types? %>
          <%= link_to t("layouts.decidim.conference_hero.register"), decidim_conferences.conference_registration_types_path(current_participatory_space, locale: current_locale), class: "button button__lg button__secondary" %>
        <% end %>
      <% end %>

      <% component_meeting = current_participatory_space.components.where(manifest_name: "meetings").published.first || self.try(:current_component) %>
      <% if component_meeting.present? %>
        <%= link_to translated_attribute(component_meeting.name), decidim_conferences.conference_conference_program_path(current_participatory_space, id: component_meeting.id, locale: current_locale), class: "button button__lg button__transparent" %>
      <% end %>
    </div>
  </div>
</section>
